GtkMenu: Don't subtract shadow from requisition
authorVolker Sobek <reklov@live.com>
Tue, 15 Jul 2014 23:09:05 +0000 (01:09 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 17 Jul 2014 03:29:35 +0000 (23:29 -0400)
This was causing menus to show up in the wrong position in case the menu
popped up towards the top and/or left.

The change to the requisition was in error; it is the allocated size
of the menu, not the toplevel, and doesn't include the shadow.

https://bugzilla.gnome.org/show_bug.cgi?id=591258

gtk/gtkmenu.c

index 4dac40c85e970418ad81233ee46fb1f64a30215b..ce023f96b37d2ced40f71f9b79e9e21551aff8eb 100644 (file)
@@ -4494,8 +4494,8 @@ gtk_menu_position (GtkMenu  *menu,
 
   _gtk_window_get_shadow_width (GTK_WINDOW (priv->toplevel), &border);
 
-  requisition.width = gtk_widget_get_allocated_width (widget)- border.left - border.right;
-  requisition.height = gtk_widget_get_allocated_height (widget) - border.top - border.bottom;
+  requisition.width = gtk_widget_get_allocated_width (widget);
+  requisition.height = gtk_widget_get_allocated_height (widget);
 
   if (pointer_screen != screen)
     {